<?php echo $header; ?>
<div class="breadcrumb">
  <div class="container">
    <h1><?php echo $heading_title; ?></h1>
    <ul>
      <?php foreach ($breadcrumbs as $breadcrumb) { ?>
      <li><a href="<?php echo $breadcrumb['href']; ?>"><?php echo $breadcrumb['text']; ?></a></li>
      <?php } ?>
    </ul>
  </div>
</div>
<div class="container">
  <?php if ($success) { ?>
  <div class="alert alert-success"><i class="fa fa-check-circle"></i> <?php echo $success; ?></div>
  <?php } ?>
  <div class="row"><?php echo $column_left; ?>
    <?php if ($column_left && $column_right) { ?>
    <?php $class = 'col-sm-6'; ?>
    <?php } elseif ($column_left || $column_right) { ?>
    <?php $class = 'col-sm-9'; ?>
    <?php } else { ?>
    <?php $class = 'col-sm-12'; ?>
    <?php } ?>
    <div id="content" class="<?php echo $class; ?>"><?php echo $content_top; ?>
      <h3><?php echo $text_customer_coupons; ?></h3>
      <?php if(isset($coupons) && $coupons) { ?>
      <div class="row">
        <?php foreach ($coupons as $coupon) { ?>
        <div class="col-md-4 col-sm-6 col-xs-12">
          <div class="coupon-item-wrapper">
            <div class="coupon-item">
              <div class="coupon-border">
                <p class="coupon-discount"><?php echo $coupon['discount']; ?></p>
                <p><?php echo $coupon['name']; ?></p>
                <span><?php echo $text_coupon_code; ?>: <?php echo $coupon['code']; ?></span>
                <span><?php echo $coupon['date_start']; ?> 至 <?php echo $coupon['date_end']; ?></span>
                <span><?php echo $text_valid; ?>: <?php echo $coupon['valid'] ? $text_yes : $text_no; ?></span>
              </div>
            </div>
          </div>
        </div>
        <?php } ?>
      </div>
      <?php } ?>
      <div class="buttons clearfix">
        <div class="pull-right"><a href="<?php echo $back; ?>" class="btn btn-primary"><?php echo $button_back; ?></a></div>
      </div>
      <?php echo $content_bottom; ?>
    </div>
    <?php echo $column_right; ?>
  </div>
</div>
<?php echo $footer; ?>
